package com.jiyun.controller;

import com.jiyun.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;
import java.util.Map;

@RestController
public class UserController {
    @Autowired
    UserService userService;
    @RequestMapping("findAll")
    public List<Map> findAll(@RequestBody Map map) throws IOException {
        return userService.findAll(map);
    }
    @RequestMapping("add")
    public Integer add(@RequestBody Map map) throws IOException {
        return userService.add(map);
    }
    @RequestMapping("del")
    public Integer del(Integer id) throws IOException {
        return userService.del(id);
    }
}
